package org.dromara.code.domain.bo

import org.dromara.code.domain.CodeProduct
import org.dromara.common.mybatis.core.domain.BaseEntity
import org.dromara.common.core.validate.AddGroup
import org.dromara.common.core.validate.EditGroup
import org.dromara.common.core.NoArg
import io.github.linpeilie.annotations.AutoMapper
import jakarta.validation.constraints.*

/**
 * 一物一码产品类目业务对象 code_product
 *
 * @author Blutter J
 * @date 2025-08-07
 */
@NoArg
@AutoMapper(target = CodeProduct::class, reverseConvertGenerate = false)
data class CodeProductBo (

    /**
     * 主键
     */
    var id: Long? = null,

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空", groups = [AddGroup::class, EditGroup::class])
    var productName: String? = null,

    /**
     * 排序号
     */
    @NotNull(message = "排序号不能为空", groups = [AddGroup::class, EditGroup::class])
    var orderNum: Int? = null,

    /**
     * 字段数据JSON
     */
    var dataJson: String? = null,
) : BaseEntity()
